#include "Unit.h"

#define FEET_TO_BASE_UNIT 1
#define YARD_TO_BASE_UNIT (3*FEET_TO_BASE_UNIT)
#define MILE_TO_BASE_UNIT (1760*YARD_TO_BASE_UNIT)

const Unit& Unit::getMile()
{
    static const Unit mile(MILE_TO_BASE_UNIT);
    return mile;
}

const Unit& Unit::getYard()
{
    static const Unit yard(YARD_TO_BASE_UNIT);
    return yard;
}

const Unit& Unit::getFeet()
{
    static const Unit feet(FEET_TO_BASE_UNIT);
    return feet;
}

Unit::Unit(int factor):factor_m(factor)
{
}

